package com.aifast.crm.customer.entity;


import com.aifast.common.base.BaseEntity;
import com.aifast.common.dict.DictBind;
import com.aifast.common.dict.DictBindType;
import com.aifast.common.dict.DictFormatType;
import com.alibaba.excel.annotation.ExcelProperty;
import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.hibernate.validator.constraints.NotBlank;

/**
 * 客户跟进对象 crm_follow
 *
 * @author fujian
 * @date 2022-08-30
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@Builder
public class CrmFollow extends BaseEntity {
    private static final long serialVersionUID = 1L;

    /**
     * 内容
     */
    @ExcelProperty("内容")
    @NotBlank(message = "内容 不能为空！")
    private String content;

    /**
     * 类型
     */
    @ExcelProperty("类型")
    @DictBind(type = "followType")
    @NotBlank(message = "类型 不能为空！")
    private Integer type;

    /**
     * 客户id
     */
    @ExcelProperty("客户id")
    private Integer customerId;

    /**
     * 客户联系人id
     */
    @ExcelProperty("客户联系人id")
    private Integer customerContactsId;

    /**
     * 跟进人用户id
     */
    @ExcelProperty("跟进人用户id")
    @TableField(fill = FieldFill.INSERT)
    private Integer userId;

    /**
     * 跟进人部门id
     */
    @ExcelProperty("跟进人部门id")
    @TableField(fill = FieldFill.INSERT)
    @DictBind(tableName = "sys_org", columns = "name", mode = DictBindType.JOIN, target = "deptName")
    private Integer deptId;

}
